package com.FengChaoSystem.tool;

import com.FengChaoSystem.service.NewImpl;
import com.FengChaoSystem.service.NewService.NewService;
import com.FengChaoSystem.untils.EmailUtil;

/**
 * 定时任务
 */
public class TimeTask implements Runnable{

    public TimeTask(String email) {
        this.email = email;
    }

    public TimeTask() {
    }

    private String email;
    private String onlyId;
    private int userId;

    public TimeTask(String email, String onlyId) {
        this.email = email;
        this.onlyId = onlyId;
    }

    public String getOnlyId() {
        return onlyId;
    }

    public void setOnlyId(String onlyId) {
        this.onlyId = onlyId;
    }

    public String getEmail() {
        return email;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public void setEmail(String email) {
        this.email = email;
    }
    private EmailUtil emailUtil = EmailUtil.instance;

    @Override
    public void run() {

        emailUtil.sendMessage(email,onlyId,userId);

    }
}
